package com.hsgene.message.service.impl;

import com.hsgene.message.domain.MessageInfo;
import com.hsgene.message.persistence.MessagePersistence;
import com.hsgene.message.service.MessageService;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;

import java.util.Map;

/**
 * 消息业务层
 *
 * @Author: wangxuefeng@hsgene.com
 * @Description:
 * @Date: Created in 15:35 2018/6/25
 * @Modified By:
 */
@Service
public class MessageServiceImpl implements MessageService {

    @Autowired
    private MessagePersistence messagePersistence;

    /**
     * 插入数据库
     *
     * @param messageInfo 信息对象
     * @return
     */
    @Override
    public int insert(MessageInfo messageInfo) {
        return messagePersistence.insert(messageInfo);
    }

    @Override
    public Map<String, Object> getVerifyCodeByPhone(String phone) {
        return messagePersistence.getVerifyCodeByPhone(phone);
    }

}
